Automatic scaling of microservices applications

ABSTRACT

A device may receive information identifying a set of tasks to be executed by a microservices application that includes a plurality of microservices. The device may determine an execution time of the set of tasks based on a set of parameters and a model. The set of parameters may include a first parameter that identifies a first number of instances of a first microservice of the plurality of microservices, and a second parameter that identifies a second number of instances of a second microservice of the plurality of microservices. The device may compare the execution time and a threshold. The threshold may be associated with a service level agreement. The device may selectively adjust the first number of instances or the second number of instances based on comparing the execution time and the threshold.

RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.16/948,729, filed Sep. 30, 2020, which is a continuation of U.S. patentapplication Ser. No. 16/270,077, filed Feb. 7, 2019 (now U.S. Pat. No.10,795,674), which is a continuation of U.S. patent application Ser. No.15/388,014, filed Dec. 22, 2016 (now U.S. Pat. No. 10,223,109), thecontents of which are incorporated herein by reference in theirentireties.

BACKGROUND

A microservices architecture may refer to a software application thatincludes a suite of independently deployable and modular applicationsthat each execute a unique process and interact to achieve an overallfunctionality of the software application.

SUMMARY

According to some possible implementations, a device may include one ormore processors to receive information identifying a set of tasks to beexecuted. The set of tasks may be associated with a microservicesapplication. The microservices application may be associated with a setof microservices. The one or more processors may determine an executiontime of the set of tasks based on a set of parameters and a model. Theset of parameters may include, at least, a first parameter thatidentifies a number of tasks of the set of tasks, a second parameterthat identifies a first number of instances of a first microservice ofthe set of microservices, a third parameter that identifies a firstscore associated with the first microservice of the set ofmicroservices, a fourth parameter that identifies a second number ofinstances of a second microservice of the set of microservices, and afifth parameter that identifies a second score associated with thesecond microservice of the set of microservices. The one or moreprocessors may compare the execution time and a threshold. The one ormore processors may selectively adjust the first number of instances ofthe first microservice or the second number of instances of the secondmicroservice based on comparing the execution time and the threshold.

According to some possible implementations, a non-transitorycomputer-readable medium may store one or more instructions that, whenexecuted by one or more processors of a device, cause the one or moreprocessors to receive information identifying a set of tasks to beexecuted by a microservices application that includes a plurality ofmicroservices. The one or more instructions may cause the one or moreprocessors to determine an execution time of the set of tasks based on aset of parameters and a model. The set of parameters may include a firstparameter that identifies a first number of instances of a firstmicroservice of the plurality of microservices, and a second parameterthat identifies a second number of instances of a second microservice ofthe plurality of microservices. The one or more instructions may causethe one or more processors to compare the execution time and athreshold. The threshold may be associated with a service levelagreement. The one or more instructions may cause the one or moreprocessors to selectively adjust the first number of instances or thesecond number of instances based on comparing the execution time and thethreshold.

According to some possible implementations, a method may includereceiving, by a device, information that identifies a set of tasks to beexecuted. The set of tasks may be associated with a microservicesapplication. The microservices application may be associated with a setof microservices. The method may include determining, by the device, anexecution time of the set of tasks based on a set of parameters. The setof parameters may include a first parameter that identifies a firstnumber of instances of a first microservice of the set of microservices,a second parameter that identifies a first score associated with thefirst microservice, a third parameter that identifies a second number ofinstances of a second microservice, and a fourth parameter thatidentifies a second score associated with the second microservice of theset of microservices. The method may include determining, by the device,whether the execution time satisfies a threshold. The method may includeselectively adjusting, by the device, the first number of instances orthe second number of instances based on determining whether theexecution time satisfies the threshold.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1A-1D are diagrams of an overview of an example implementationdescribed herein;

FIG. 2 is a diagram of an example environment in which systems and/ormethods, described herein, may be implemented;

FIG. 3 is a diagram of example components of one or more devices of FIG.2; and

FIG. 4 is a flow chart of an example process for automatically adjustinga number of instances of a microservice based on an execution time of aset of tasks.

DETAILED DESCRIPTION

The following detailed description of example implementations refers tothe accompanying drawings. The same reference numbers in differentdrawings may identify the same or similar elements.

A microservices application may include an application that includes aset of applications (e.g., microservices) that each performs aparticular functionality of the microservices application, and that eachinteracts to perform an overall functionality of the microservicesapplication. Microservices, of the microservices application, may beindependently scalable. That is, a first microservice may be associatedwith a first number of instances that are executing, a secondmicroservice may be associated with a second number of instances thatare executing, etc.

In some cases, a scheduling device may inefficiently provision networkdevices to execute microservices (e.g., server devices that execute themicroservices). For example, the scheduling device may provision aninadequate number of instances of a first microservice, and/or mayprovision a superfluous number of instances of a second microservice. Ineither case, resources (e.g., processor, memory, etc.) are inefficientlyutilized.

Implementations described herein enable a scheduling platform toprovision network devices such that resources are efficiently utilized.For example, the scheduling platform may receive information thatidentifies a set of tasks, associated with a microservices application,to be executed. In some implementations, a service level agreement (SLA)may indicate a time frame (e.g., an amount of time) in which the set oftasks are to be completed (e.g., a threshold). The scheduling platformmay determine an execution time (e.g., an estimated execution time, suchas an amount of time associated with executing each task of the set oftasks), of the set of tasks, based on a set of parameters and a model.Additionally, the scheduling platform may selectively and dynamicallyadjust a number of instances, of a microservice, based on the executiontime. In this way, implementations described herein enable thescheduling platform to dynamically and automatically scale particularmicroservices such that an overall execution time may be reduced and/orsatisfy the threshold associated with the SLA, thereby conservingprocessor and/or memory resources of network devices that are executingmicroservices, and/or conserving network resources.

FIGS. 1A-1D are diagrams of an overview of an example implementation 100described herein. As shown in FIG. 1A, and by reference number 110, ascheduling platform (e.g., a server device) may receive informationidentifying a set of tasks, associated with a microservices application,to be executed. For example, assume that the microservices applicationprovides functionality for configuring network devices (e.g., switches,routers, firewalls, etc.). Assume that a client device (e.g., acomputing device) provides (e.g., based on an input from a user), to thescheduling platform, a request for the set of tasks to be executed. Forexample, assume that the set of tasks is associated with configuring5000 network devices (e.g., 5000 tasks). Additionally, a service levelagreement (SLA) between a user associated with the client device and anetwork operator associated with providing the microservices application(e.g., via the scheduling platform) may prescribe a time frame for whichthe set of tasks are to be executed. Assume that the time frame is 2hours (e.g., a threshold).

As shown by reference number 120, the scheduling platform may determinean execution time of the set of tasks based on a set of parameters and amodel. For example, the parameters may include information thatidentifies a percentage of completion of the set of tasks (e.g., 0%), anumber of tasks (e.g., 5000), an elapsed time associated with the set oftasks (e.g., 0:00), and various numbers of instances of variousmicroservices of the microservices application (e.g., 15 formicroservice 1, 10 for microservice 2, and 4 for microservice N). Insome implementations, the scheduling platform may determine an executiontime (e.g., an estimated execution time) based on the model (e.g., anamount of time to execute the 5000 tasks). For example, as describedelsewhere herein, the scheduling platform may train the model usinginformation associated with previous executions of sets of tasks, andmay use the model to predict execution times for other sets of tasks.

For example, as shown, the scheduling platform may determine anexecution time of 1 hour. Additionally, as shown, the schedulingplatform may determine that the execution time satisfies the thresholdassociated with the SLA (e.g., 2 hours). In this case, the schedulingplatform may provision network devices to execute particular numbers ofinstances of the microservices (e.g., cause particular network devicesto execute particular numbers of instances of the microservices) so asto complete execution of the set of tasks within the 2 hour time frameassociated with the SLA.

As shown in FIG. 1B, the network devices (e.g., that were provisioned bythe scheduling platform) may execute the set of tasks. In someimplementations, the microservices may interact to execute a task (e.g.,microservices may execute various subtasks of a task). As an example,microservice 1 may execute a first subtask associated with a templateservice (e.g., transforming various configuration data into aconfiguration for a network device). Microservice 2 may execute a secondsubtask associated with a connectivity service (e.g., pushing aconfiguration to a network device). Because multiple instances ofmicroservices are executing, multiple tasks may be executed in parallel.By executing tasks in parallel, an execution time may be reduced,thereby conserving processor and/or memory resources of network devices.

As shown in FIG. 1C, and by reference number 140, the schedulingplatform may determine that an execution time does not satisfy athreshold. For example, in a similar manner as described above inconnection with FIG. 1A, the scheduling platform may determine anexecution time based on a set of parameters and the model. For example,as shown, the scheduling platform determines an execution time of 1.5hours (e.g., an estimated time for the remaining set of tasks to beexecuted). Additionally, an elapsed time associated with the executionof the set of tasks is 40 minutes. Thus, in this case, an overallexecution time of the set of tasks may be 2 hours and 10 minutes (e.g.,an execution time that does not satisfy the threshold of 2 hoursassociated with the SLA).

As shown in FIG. 1D, and by reference number 150, the schedulingplatform may selectively adjust a number of instances, of amicroservice, based on the execution time. For example, as shown, thescheduling platform may adjust a number of instances of microservice 1(e.g., increase from 15 to 30), and may adjust a number of instances ofmicroservice 2 (e.g., decease from 20 to 5). As described elsewhereherein, the scheduling platform may dynamically scale particularmicroservices based on scores, priorities, or the like.

For example, assume that microservice 1 is associated with a greateramount of execution time of a subtask than as compared to microservice2, requires more resources than microservice 2, or the like.Additionally, microservice 2 may rely on an execution result of asubtask associated with microservice 1. In this way, more subtasks,associated with microservices 1, may execute in parallel, therebydecreasing an execution time associated with the set of tasks andthereby conserving processor and/or memory resources of network devicesand/or scheduling platform. Additionally, in this way, a number ofinstances, of microservice 2, that are waiting for an execution resultof microservice 1, may be reduced, thereby conserving processor and/ormemory resources of network devices by more efficiently utilizingavailable resources than as compared to executing multiple instances ofa microservice that remain idle.

As shown in FIG. 1D, the scheduling platform may determine that theexecution time satisfies the threshold. For example, the elapsed time of40 minutes and the execution time of 54 minutes may result in an overallexecution time of 1 hour and 34 minutes, thereby satisfying thethreshold of 2 hours.

By receiving information identifying a set of tasks, and determiningtheir execution time based on various parameters and a model, thescheduling platform is able to dynamically and selectively adjustinstances of various microservices, thereby enabling the set of tasks tobe executed in an expected and/or an estimated amount of time. In thisway, the scheduling platform can scale particular microservices in orderto reduce an execution time of the set of tasks, and accordingly reduceuse of processor and/or memory resources of devices that are executingmicroservices, and/or conserve network resources.

As indicated above, FIGS. 1A-1D are provided merely as an example. Otherexamples are possible and may differ from what was described with regardto FIGS. 1A-1D.

FIG. 2 is a diagram of an example environment 200 in which systemsand/or methods, described herein, may be implemented. As shown in FIG.2, environment 200 may include a client device 210, a schedulingplatform 220, a set of network devices 230, and a network 240. Devicesof environment 200 may interconnect via wired connections, wirelessconnections, or a combination of wired and wireless connections.

Client device 210 includes one or more devices capable of receiving,generating, storing, processing, and/or providing information associatedwith a microservices application to be executed. For example, clientdevice 210 may include a computing device, such as a desktop computer, alaptop computer, a tablet computer, a handheld computer, a serverdevice, a mobile phone (e.g., a smart phone or a radiotelephone), or asimilar type of device.

Scheduling platform 220 includes one or more devices capable ofautomatically and dynamically scaling microservices associated with amicroservices application. In some implementations, scheduling platform220 may be designed to be modular such that certain software componentscan be swapped in or out depending on a particular need. As such,scheduling platform 220 may be easily and/or quickly reconfigured fordifferent uses. In some implementations, scheduling platform 220 may beimplemented in network device 230 or a set of network devices 230.

In some implementations, as shown, scheduling platform 220 may be hostedin cloud computing environment 222. Notably, while implementationsdisclosed herein describe scheduling platform 220 as being hosted incloud computing environment 222, in some implementations, schedulingplatform 220 may not be cloud-based (i.e., may be implemented outside ofa cloud computing environment) or may be partially cloud-based.

Cloud computing environment 222 includes an environment that hostsscheduling platform 220. Cloud computing environment 222 may providecomputation, software, data access, storage, etc. services that do notrequire end-user (e.g., client device 210) knowledge of a physicallocation and configuration of system(s) and/or device(s) that hostsscheduling platform 220. As shown, cloud computing environment 222 mayinclude a group of computing resources 224 (referred to collectively as“computing resources 224” and individually as “computing resource 224”).

Computing resource 224 includes one or more personal computers,workstation computers, server devices, or other types of computationand/or communication devices. In some implementations, computingresource 224 may host scheduling platform 220. The cloud resources mayinclude compute instances executing in computing resource 224, storagedevices provided in computing resource 224, data transfer devicesprovided by computing resource 224, etc. In some implementations,computing resource 224 may communicate with other computing resources224 via wired connections, wireless connections, or a combination ofwired and wireless connections.

As further shown in FIG. 2, computing resource 224 includes a group ofcloud resources, such as one or more applications (“APPs”) 224-1, one ormore virtual machines (“VMs”) 224-2, virtualized storage (“VSs”) 224-3,one or more hypervisors (“HYPs”) 224-4, or the like.

Application 224-1 includes one or more software applications that may beprovided to or accessed by client device 210. Application 224-1 mayeliminate a need to install and execute the software applications onclient device 210. For example, application 224-1 may include softwareassociated with scheduling platform 220 and/or any other softwarecapable of being provided via cloud computing environment 222. In someimplementations, one application 224-1 may send/receive informationto/from one or more other applications 224-1, via virtual machine 224-2.

Virtual machine 224-2 includes a software implementation of a machine(e.g., a computer) that executes programs like a physical machine.Virtual machine 224-2 may be either a system virtual machine or aprocess virtual machine, depending upon use and degree of correspondenceto any real machine by virtual machine 224-2. A system virtual machinemay provide a complete system platform that supports execution of acomplete operating system (“OS”). A process virtual machine may executea single program, and may support a single process. In someimplementations, virtual machine 224-2 may execute on behalf of a user(e.g., client device 210), and may manage infrastructure of cloudcomputing environment 222, such as data management, synchronization, orlong-duration data transfers.

Virtualized storage 224-3 includes one or more storage systems and/orone or more devices that use virtualization techniques within thestorage systems or devices of computing resource 224. In someimplementations, within the context of a storage system, types ofvirtualizations may include block virtualization and filevirtualization. Block virtualization may refer to abstraction (orseparation) of logical storage from physical storage so that the storagesystem may be accessed without regard to physical storage orheterogeneous structure. The separation may permit administrators of thestorage system flexibility in how the administrators manage storage forend users. File virtualization may eliminate dependencies between dataaccessed at a file level and a location where files are physicallystored. This may enable optimization of storage use, serverconsolidation, and/or performance of non-disruptive file migrations.

Hypervisor 224-4 may provide hardware virtualization techniques thatallow multiple operating systems (e.g., “guest operating systems”) toexecute concurrently on a host computer, such as computing resource 224.Hypervisor 224-4 may present a virtual operating platform to the guestoperating systems, and may manage the execution of the guest operatingsystems. Multiple instances of a variety of operating systems may sharevirtualized hardware resources.

Network device 230 includes one or more devices capable of executing amicroservices application. For example, network device 230 may include afirewall, a router, a gateway, a switch, a hub, a bridge, a reverseproxy, a server (e.g., a proxy server, a server executing a virtualmachine, etc.), a security device, an intrusion detection device, a loadbalancer, or a similar device. In some implementations, network device230 may execute a particular number of instances of a microservice or aset of microservices, associated with a microservices application, basedon being provisioned by scheduling platform 220.

Network 240 includes one or more wired and/or wireless networks. Forexample, network 240 may include a cellular network (e.g., a fifthgeneration (5G) network, a long-term evolution (LTE) network, a thirdgeneration (3G) network, a code division multiple access (CDMA) network,etc.), a public land mobile network (PLMN), a local area network (LAN),a wide area network (WAN), a metropolitan area network (MAN), atelephone network (e.g., the Public Switched Telephone Network (PSTN)),a private network, an ad hoc network, an intranet, the Internet, a fiberoptic-based network, a cloud computing network, or the like, and/or acombination of these or other types of networks.

The number and arrangement of devices and networks shown in FIG. 2 areprovided as an example. In practice, there may be additional devicesand/or networks, fewer devices and/or networks, different devices and/ornetworks, or differently arranged devices and/or networks than thoseshown in FIG. 2. Furthermore, two or more devices shown in FIG. 2 may beimplemented within a single device, or a single device shown in FIG. 2may be implemented as multiple, distributed devices. Additionally, oralternatively, a set of devices (e.g., one or more devices) ofenvironment 200 may perform one or more functions described as beingperformed by another set of devices of environment 200.

FIG. 3 is a diagram of example components of a device 300. Device 300may correspond to client device 210, scheduling platform 220, and/ornetwork device 230. In some implementations, client device 210,scheduling platform 220, and/or network device 230 may include one ormore devices 300 and/or one or more components of device 300. As shownin FIG. 3, device 300 may include a bus 310, a processor 320, a memory330, a storage component 340, an input component 350, an outputcomponent 360, and a communication interface 370.

Bus 310 includes a component that permits communication among thecomponents of device 300. Processor 320 is implemented in hardware,firmware, or a combination of hardware and software. Processor 320 takesthe form of a central processing unit (CPU), a graphics processing unit(GPU), an accelerated processing unit (APU), a microprocessor, amicrocontroller, a digital signal processor (DSP), a field-programmablegate array (FPGA), an application-specific integrated circuit (ASIC), oranother type of processing component. In some implementations, processor320 includes one or more processors capable of being programmed toperform a function. Memory 330 includes a random access memory (RAM), aread only memory (ROM), and/or another type of dynamic or static storagedevice (e.g., a flash memory, a magnetic memory, and/or an opticalmemory) that stores information and/or instructions for use by processor320.

Storage component 340 stores information and/or software related to theoperation and use of device 300. For example, storage component 340 mayinclude a hard disk (e.g., a magnetic disk, an optical disk, amagneto-optic disk, and/or a solid state disk), a compact disc (CD), adigital versatile disc (DVD), a floppy disk, a cartridge, a magnetictape, and/or another type of non-transitory computer-readable medium,along with a corresponding drive.

Input component 350 includes a component that permits device 300 toreceive information, such as via user input (e.g., a touch screendisplay, a keyboard, a keypad, a mouse, a button, a switch, and/or amicrophone). Additionally, or alternatively, input component 350 mayinclude a sensor for sensing information (e.g., a global positioningsystem (GPS) component, an accelerometer, a gyroscope, and/or anactuator). Output component 360 includes a component that providesoutput information from device 300 (e.g., a display, a speaker, and/orone or more light-emitting diodes (LEDs)).

Communication interface 370 includes a transceiver-like component (e.g.,a transceiver and/or a separate receiver and transmitter) that enablesdevice 300 to communicate with other devices, such as via a wiredconnection, a wireless connection, or a combination of wired andwireless connections. Communication interface 370 may permit device 300to receive information from another device and/or provide information toanother device. For example, communication interface 370 may include anEthernet interface, an optical interface, a coaxial interface, aninfrared interface, a radio frequency (RF) interface, a universal serialbus (USB) interface, a Wi-Fi interface, a cellular network interface, orthe like.

Device 300 may perform one or more processes described herein. Device300 may perform these processes in response to processor 320 executingsoftware instructions stored by a non-transitory computer-readablemedium, such as memory 330 and/or storage component 340. Acomputer-readable medium is defined herein as a non-transitory memorydevice. A memory device includes memory space within a single physicalstorage device or memory space spread across multiple physical storagedevices.

Software instructions may be read into memory 330 and/or storagecomponent 340 from another computer-readable medium or from anotherdevice via communication interface 370. When executed, softwareinstructions stored in memory 330 and/or storage component 340 may causeprocessor 320 to perform one or more processes described herein.Additionally, or alternatively, hardwired circuitry may be used in placeof or in combination with software instructions to perform one or moreprocesses described herein. Thus, implementations described herein arenot limited to any specific combination of hardware circuitry andsoftware.

The number and arrangement of components shown in FIG. 3 are provided asan example. In practice, device 300 may include additional components,fewer components, different components, or differently arrangedcomponents than those shown in FIG. 3. Additionally, or alternatively, aset of components (e.g., one or more components) of device 300 mayperform one or more functions described as being performed by anotherset of components of device 300.

FIG. 4 is a flow chart of an example process 400 for automaticallyadjusting a number of instances of a microservice based on an executiontime of a set of tasks. In some implementations, one or more processblocks of FIG. 4 may be performed by scheduling platform 220. In someimplementations, one or more process blocks of FIG. 4 may be performedby another device or a group of devices separate from or includingscheduling platform 220, such as client device 210 and/or network device230.

As shown in FIG. 4, process 400 may include receiving informationidentifying a set of tasks, associated with a microservices application,to be executed (block 410). For example, scheduling platform 220 mayreceive information identifying a set of tasks, associated with amicroservices application, to be executed. In some implementations, amicroservices application may include an application that includes a setof microservices. In some implementations, a microservice may include anapplication that performs a particular functionality of themicroservices application. In some implementations, the microservicesapplication may be associated with hundreds, thousands, etc. ofmicroservices.

In other words, microservices, of the microservices application, mayrefer to independent applications that interact (e.g., over a network)to perform an overall functionality of the microservices application. Asan example, the microservices application may receive an inputassociated with a task to be executed, a first microservice may executea first subtask of the task (e.g., associated with a particularfunctionality of the microservices application), and the firstmicroservice may provide an execution result of the first subtask to asecond microservice. Continuing with the example, the secondmicroservice may then execute a second subtask of the task based on theexecution result of the first subtask. In some implementations, the setof tasks may include thousands, millions, billions, etc. of tasks and/orsubtasks.

In some implementations, microservices may provide execution results toother microservices via application programming interfaces (APIs),messaging queues, or the like. In this way, the set of microservices mayperform respective subtasks, of a task, and interact (e.g., communicateexecution results) to achieve an overall functionality of themicroservices application.

In some implementations, the set of tasks may be associated with a job.For example, client device 210, may provide, to scheduling platform 220,a request for a job to be scheduled. In some implementations, schedulingplatform 220 may receive, based on the request for the job to bescheduled, the information identifying the set of tasks to be executed.Additionally, or alternatively, an SLA may indicate a time frame forwhich the job is to be completed (e.g., an amount of time in which thesets of tasks is to be executed). As described elsewhere herein,scheduling platform 220 may determine a threshold (e.g., a thresholdamount of time) based on the SLA, compare an execution time and thethreshold, and selectively and dynamically scale particularmicroservices based on comparing the execution time and the threshold(e.g., to enable the job to complete within the threshold indicated byor determined from the SLA).

In some implementations, scheduling platform 220 may provision networkdevices 230 to execute the microservices application. For example,scheduling platform 220 may provision particular network devices 230 toexecute a particular number of instances of microservices, as describedelsewhere herein. In this way, microservices, of the microservicesapplication, may be independently scaled, thereby enabling an executiontime of the set of tasks to be adjusted (e.g., to satisfy the thresholdassociated with the SLA).

As further shown in FIG. 4, process 400 may include determining anexecution time, of the set of tasks, based on a set of parameters and amodel (block 420). For example, scheduling platform 220 may determine anexecution time, of the set of tasks, based on a set of parameters and amodel. In some implementations, an execution time may refer to a timeframe (e.g., an amount of time) for the set of tasks to be executed. Forexample, the job may complete within a particular amount of time basedon every task, of the set of tasks, being executed (e.g., the executiontime). In some implementations, the execution time may refer to anestimated execution time. That is, scheduling platform 220 may use themodel to estimate an execution time.

In some implementations, scheduling platform 220 may implement a machinelearning technique to determine an execution time of the set of tasks.For example, scheduling platform 220 may use one or more artificialintelligence and/or machine learning techniques to analyze data (e.g.,training data, such as historical execution times of particular tasks,etc.) and create models. The techniques may include, for example,supervised and/or unsupervised techniques, such as artificial networks,case-based reasoning, Bayesian statistics, learning automata, HiddenMarkov Modeling, linear classifiers, quadratic classifiers, decisiontrees, association rule learning, or the like. Additionally, oralternatively, scheduling platform 220 may use another kind ofcomputer-implemented technique, such as machine perception, or computervision, to analyze data and generate models.

As an example, scheduling platform 220 may receive information thatidentifies the set of tasks, information that identifies parameters, andinformation that identifies an execution time of the set of tasks, andmay train a model using the information. In this way, schedulingplatform 220 may receive information that identifies tasks to bescheduled for execution, and may determine an execution time of thetasks based on the model and parameters associated with the tasks. Insome implementations, scheduling platform 220 may implement a model todetermine an execution time of the set of tasks. As a particularexample, scheduling platform 220 may determine an execution time basedon the following regression model:

H _(Φ)(x)=Φ₁+Φ₂*(type of microservices application)+Φ₃*(number oftasks)+Φ₄*(elapsed time)+Φ₅*(time period)+Φ₆*(percentagecompletion)+Φ₇*(number of instances of microservice 1*score)+Φ₈*(numberof instances of microservice 2*score)+ . . . Φ_(n)*(number of instancesof microservice N*score)

In some implementations, Φ₁, Φ₂, . . . Φ_(n) may include variables. Forexample, scheduling platform 220 may initialize the variables withparticular values. Additionally, or alternatively, scheduling platform220 may update (e.g., adjust) the values associated with the variablesbased on receiving additional information associated with executingadditional sets of tasks. In some implementations, scheduling platform220 may be configured with particular values for the variables, andadjust the values based on receiving information associated with sets oftasks that have been executed.

In some implementations, the model may include a set of parameters thatare associated with the set of tasks. In some implementations,scheduling platform 220 may be configured with the set of parameters(e.g., by a network operator, or the like). Additionally, oralternatively, scheduling platform 220 may receive information thatidentifies particular values based on receiving a request for the set oftasks to be executed, and/or based on executing the set of tasks. As anexample, scheduling platform 220 may receive information that identifiesa number of tasks to be executed. As another example, schedulingplatform 220 may determine an elapsed time and/or a percentagecompletion based on executing the set of tasks (e.g., as the jobprogresses).

In some implementations, a parameter may include information thatidentifies a type of microservices application associated with the setof tasks (e.g., “type of microservices application”). Additionally, oralternatively, a parameter may refer to information that identifies anumber of tasks to be executed (e.g., “number of tasks”). Additionally,or alternatively, a parameter may refer to information that identifiesan elapsed time associated with an execution of the set of tasks, suchas an amount of time that has elapsed since the start of the executionof the set of tasks (e.g., “elapsed time”).

Additionally, or alternatively, a parameter may refer to informationthat identifies a time period associated with the execution of the setof tasks, such as a time of day, a day of the week, a week of the month,etc. (e.g., “time period”). Additionally, or alternatively, a parametermay refer to information that identifies a percentage completion of theset of tasks, such as 50% if 500 tasks of 1000 tasks have been executed(e.g., “percentage completion”).

Additionally, or alternatively, a parameter may include information thatidentifies a number of instances of a microservice (e.g., “number ofinstances of microservice 1,” “number of instances of microservice 2,” .. . “number of instances of microservice N”). Additionally, oralternatively, a parameter may include information that identifies ascore associated with a microservice (e.g., a score, a rank, a value, adesignation, a priority, etc.).

In some implementations, scheduling platform 220 may determine a scorefor a particular microservice based on a set of factors associated withthe microservice. For example, scheduling platform 220 may determinevalues for a set of factors, such as an instruction metric associatedwith the microservice (e.g., lines of code (LOC) of the microservice,such as source lines of code (SLOC), physical SLOC, logical SLOC (LLOC),or the like), an execution time (e.g., historical execution times) ofthe microservice, a number of requests for the microservice to execute asubtask (e.g., a number of API calls from other microservices), aresource utilization of the microservice (e.g., processor, memory,etc.), an amount of time that the microservice is executing subtasks(e.g., not awaiting an execution result from another microservice), orthe like.

In some implementations, scheduling platform 220 may determine a scorefor a microservice based on values associated with the set of factors.Additionally, or alternatively, scheduling platform 220 may assignparticular weights to particular factors, and determine a score based onthe weights. In this way, scheduling platform 220 may determine a firstscore for a first microservice, determine a second score for a secondmicroservice, etc. For example, a first microservice that includes morelines of code may be associated with a higher score than a secondmicroservice that includes fewer lines of code. As another example, afirst microservice, that is associated with a greater amount ofexecution time (e.g., an amount of time in which the first microserviceis executing a subtask) may be associated with a higher score than asecond microservice that is associated with less execution time.

In some implementations, a score may be indicative of a particularmicroservice requiring more resources than another microservice (e.g.,for the set of tasks to be executed within a time frame). For example,increasing a number of instances of a microservice that is associatedwith a high score may reduce an execution time of the set of tasks.Additionally, reducing a number of instances of a microservice that isassociated with a low score may not significantly impact an executiontime of the set of tasks (e.g., as compared to if a number of instancesof a microservice that is associated with a high score is reduced).

In some implementations, scheduling platform 220 may train the modelusing training data (e.g., information associated with sets of tasksthat have been executed, parameters associated with the sets of tasks,and execution times for the sets of tasks). For example, schedulingplatform 220 may correlate known execution times and known parameters.In this way, scheduling platform 220 may use the model in associationwith particular parameter values, and determine (e.g., estimate) anexecution time. In some implementations, scheduling platform 220 may usetraining data associated with a first set of microservices applicationsto train the model and then use the model with regard to a second set ofmicroservices applications.

In some implementations, scheduling platform 220 may determine aninitial number of instances, of each microservice, to execute based onthe model. For example, scheduling platform 220 may input various valuesfor parameters of the model, and determine an execution time based onthe input values. Additionally, scheduling platform 220 may initiallyinput a value that identifies the “type of microservices application”parameter, input a value that identifies a number of tasks to beexecuted for the “number of tasks” parameter, input a value thatidentifies an elapsed time (e.g., zero) for the “elapsed time”parameter, input a value that identifies a time associated with the“time period” parameter, input a value that identifies a percentagecompletion (e.g., zero) for the “percentage completion” parameter, andinput values that identify respective numbers of instances of eachmicroservice and respective scores of the microservices.

In some implementations, scheduling platform 220 may determine aninitial number of instances of each microservice (e.g., a number ofinstances to provision to be executed). In some implementations,scheduling platform 220 may determine an amount of available resources(e.g., of network devices 230) that may be utilized to execute themicroservices application. For example, scheduling platform 220 mayreceive, from network devices 230, information that identifies availableresources of network devices 230. Scheduling platform 220 may determinean initial number of instances of each microservice based on theinformation that identifies the available resources. In someimplementations, the amount of available resources may be limited. Thatis, no more than a threshold number of instances of microservices may beexecuted. As such, scheduling platform 220 may scale particularmicroservices such that the execution time may satisfy a threshold(e.g., associated with an SLA), as described elsewhere herein.

In some implementations, scheduling platform 220 may determine theinitial number of instances of each microservice based on scores of themicroservices. For example, scheduling platform 220 may, using themodel, input a greater number of instances of a first microservice thatis associated with a higher score than as compared to a secondmicroservice that is associated with a lower score. As an example, themicroservice associated with the highest score may be allocated the mostinstances, the microservice associated with the second highest score maybe allocated the second most instances, etc. In some implementations,scheduling platform 220 may allocate instances in a linear manner (e.g.,2 instances for the microservice having the third highest score, 4instances for the microservice having the second highest score, and 6instances for the microservice having the highest score). Alternatively,scheduling platform 220 may allocate instances in an exponential manner(e.g., 4 instances for the microservice having the third highest score,16 instances for the microservice having the second highest score, and64 instances for the microservice having the highest score). These arejust examples of ways that scheduling platform 220 may allocateinstances of microservices. In practice, scheduling platform 220 may usea different allocation strategy.

In some implementations, scheduling platform 220 may determine aninitial number of instances of each microservice based on informationthat identifies another set of tasks that was executed within a timeframe. For example, scheduling platform 220 may identify another jobthat executed within a time frame (e.g., that satisfies the thresholdassociated with the SLA), determine an initial number of instances ofmicroservices associated with the other job, and use the number ofinstances associated with the other job as initial values for the job(e.g., when initially provisioning network devices 230).

In this way, scheduling platform 220 may determine initial values forthe set of parameters, determine an execution time based on the initialvalues and the model, and compare the execution time and a threshold, asdescribed below.

As further shown in FIG. 4, process 400 may include determining whetherthe execution time satisfies a threshold (block 430). For example,scheduling platform 220 may determine whether the execution timesatisfies a threshold. In some implementations, scheduling platform 220may determine the threshold based on an SLA. For example, schedulingplatform 220 may receive, from client device 210, information thatidentifies a job request, and an SLA may indicate a time frame for whichthe job is to be completed based on the job request (e.g., within aparticular amount of time). As a particular example, assume that the SLAindicates that the job is to be completed (e.g., every task of the setof tasks is to be executed) within a time frame (e.g., 3 hours). In thiscase, the threshold may correspond to the time frame (e.g., thethreshold is 3 hours) or may be determined based on the time frame(e.g., 90% of the time frame, 95% of the time frame, etc.). As describedelsewhere herein, the threshold may change as an elapsed time of the jobchanges (e.g., may be offset by an amount of time associated with anelapsed time).

As further shown in FIG. 4, if the execution time does not satisfy thethreshold (block 430—NO), then process 400 may include adjusting anumber of instances, of a microservice, of the microservices application(block 440). For example, if the execution time does not satisfy thethreshold, then scheduling platform 220 may adjust a number of instancesof one or more microservices (e.g., to determine an execution time thatdoes satisfy the threshold).

In some implementations, scheduling platform 220 may adjust a number ofinstances of a microservice based on the score of the microservice. Forexample, scheduling platform 220 may increase a number of instances of afirst microservice that is associated with a highest score, and decreasea number of instances of a second microservice that is associated with alowest score. Additionally, or alternatively, scheduling platform 220may increase numbers of instances of the top (e.g., the top three, thetop five, etc.) microservices (e.g., based on scores), and decreasenumbers of instances of the bottom (e.g., the bottom three, the bottomfive, etc.) microservices. In some implementations, scheduling platform220 may decrease a number of instances of a first microservice to enablea second microservice to utilize resources that were allocated to thefirst microservice (e.g., based on a limited amount of availableresources).

In this way, scheduling platform 220 may adjust a number of instances ofmicroservices, and perform operations associated with block 420 (e.g.,to determine if the updated number of instances of microservices mayrender the job capable of being completed within the thresholdassociated with the SLA).

As further shown in FIG. 4, if the execution time does satisfy thethreshold (block 430—YES), then process 400 may include provisioning anetwork device to execute the set of tasks associated with themicroservices application (block 450). For example, if the executiontime satisfies the threshold, then scheduling platform 220 may provisionnetwork devices 230 to execute a number of instances of eachmicroservice. In some implementations, scheduling platform 220 mayprovision an initial number of instances, of each microservice, to beexecuted by network devices 230 at the start of the execution of the setof tasks. For example, scheduling platform 220 may provision a number ofinstances, of each microservice, based on values used in associationwith the model (e.g., that were used to determine the execution timethat satisfies the threshold).

In some implementations, scheduling platform 220 may initially provisionnetwork devices 230 to execute a particular number of instances ofmicroservices based on determining an execution time that satisfies thethreshold. Additionally, or alternatively, scheduling platform 220 mayinitially provision network devices 230 to execute a particular numberof instances of microservices based on determining a minimum executiontime (e.g., the lowest potential execution time, an optimized executiontime, or the like). For example, scheduling platform 220 may adjustnumbers of instances of particular microservices, determine executiontimes, and repeat until a lowest potential execution time or anoptimized execution time is achieved or until a threshold number ofiterations has been achieved. In this way, scheduling platform 220 mayoptimize an execution time by identifying a particular number ofinstances of microservices that may result in a lowest execution time,an optimized execution time, or the like. Additionally, in this way,implementations described herein conserve processor and/or memoryresources of scheduling platform 220 and/or network devices 230, and/orconserve network resources.

In some implementations, scheduling platform 220 may perform operationsof blocks 420-450 as the set of tasks are being executed. For example,scheduling platform 220 may perform iterations of the operations ofblocks 420-450 at various intervals associated with an elapsed timeand/or a percentage completion of the execution of the set of tasks(e.g., 5%, 10%, 20%, every five minutes, every twenty minutes, etc.). Inthis way, scheduling platform 220 may monitor an execution of the set oftasks, and selectively and dynamically adjust a number of instances ofparticular microservices if scheduling platform 220 determines that theexecution of the set of tasks is not on pace for the total executiontime to satisfy a threshold (e.g., thereby enabling particularmicroservices to be scaled such that the set of tasks may execute withinthe time frame). In this way, implementations described herein enable anexecution time to be reduced, thereby conserving processor and/or memoryresources of scheduling platform 220 and/or network devices 230, and/orconserving network resources.

In some implementations, scheduling platform 220 may determineadditional thresholds as the set of tasks is being executed, and compareexecution times (e.g., determined using the model) and the additionalthresholds. For example, assume that the set of tasks is associated withan elapsed time of 1 hour. Additionally, assume that the threshold(e.g., time frame associated with the SLA) is 3 hours. In this case,scheduling platform may determine an execution time (e.g., as describedin connection with block 420), and compare the execution time and athreshold of 2 hours (e.g., because the initial threshold associatedwith the SLA is 3 hours, and an hour has elapsed, or 3−1=2). That is,scheduling platform 220 may adjust a threshold associated with the SLAby an amount of time that has elapsed.

In some implementations, and in a similar manner as described above inconnection with block 440, scheduling platform 220 may adjust a numberof instances of microservices as the set of tasks are being executed(e.g., to enable the set of tasks to be completed within the time frameof the SLA).

In some implementations, if network devices 230 include additionalresources that may be utilized to execute additional instances ofparticular microservices, then scheduling platform 220 may identifyavailable resources that may be utilized by microservices. In someimplementations, if network devices 230 reduce the amount of resourcesthat can be used to execute additional instances of particularmicroservices, then scheduling platform 220 may adjust (e.g., decrease)a number of instances of a particular microservice. For example,scheduling platform 220 may identify a microservice associated with thelowest score, may identify microservices associated with the five lowestscores, etc., and decrease a number of instances of the microservice(s).

In some implementations, scheduling platform 220 may identify anotherset of tasks (e.g., associated with another job), and may decrease anumber of instances of microservices that are executing in associationwith the other set of tasks. For example, scheduling platform 220 maydetermine whether another set of microservices, that are executing inassociation with another job, may be scaled down while still beingcapable of executing the other set of tasks in a particular time frame(e.g., pursuant to an SLA associated with the other job). In this way,scheduling platform 220 may adjust (e.g., decrease) a number ofinstances of particular microservices that are executing in associationwith the job, or another job, to enable other microservices to utilizeresources that were allocated to the particular microservices.

In some implementations, scheduling platform 220 may adjust (e.g.,increase) a number of instances of a particular microservice (e.g.,based on adjusting the number of instances of another microservice,and/or based on identifying available resources). In someimplementations, scheduling platform 220 may adjust a number ofinstances of a microservice that is associated with the greatest score.Additionally, or alternatively, scheduling platform 220 may adjust anumber of instances of microservices that are associated with the topfive highest scores, the top ten highest scores, etc.

In some implementations, scheduling platform 220 may determine anexecution time based on adjusting the number of instances of themicroservice(s), and determine whether the execution time satisfies athreshold (e.g., a threshold that is determined based on an initialthreshold associated with the SLA and an elapsed time). For example,scheduling platform 220 may iteratively perform operations of blocks420-450, and selectively adjust a number of instances of microservices.In this way, scheduling platform 220 may monitor an execution of a setof tasks, and dynamically scale particular microservices such that theset of tasks may be executed within a particular time frame.

In this way, implementations described herein enable scheduling platform220 to automatically and dynamically scale microservices such that anoverall execution time of a set of tasks may be reduced. In this way,implementations described herein conserve processor and/or memoryresources of scheduling platform 220 and network devices 230, and/orconserve network resources.

Although FIG. 4 shows example blocks of process 400, in someimplementations, process 400 may include additional blocks, fewerblocks, different blocks, or differently arranged blocks than thosedepicted in FIG. 4. Additionally, or alternatively, two or more of theblocks of process 400 may be performed in parallel.

The preceding descriptions indicate that a scheduling platform maydynamically and selectively adjust instances of microservices in orderto reduce execution time of a set of tasks. The scheduling platform mayreceive information identifying a set of tasks, associated with amicroservices application, to be executed. The scheduling platform maythen determine an execution time of the set of tasks based on parametersand a model. An estimated time of execution will be based on theparameters and the model. The scheduling platform, while monitoring theparameters, can then make adjustments to instances of the microservicesin order to have the set of tasks meet a required threshold time forexecution. This dynamic and selective adjustment can conserve processor,memory, and network resources of the various devices executing the setof tasks.

The foregoing disclosure provides illustration and description, but isnot intended to be exhaustive or to limit the implementations to theprecise form disclosed. Modifications and variations are possible inlight of the above disclosure or may be acquired from practice of theimplementations.

As used herein, the term component is intended to be broadly construedas hardware, firmware, and/or a combination of hardware and software.

Some implementations are described herein in connection with thresholds.As used herein, satisfying a threshold may refer to a value beinggreater than the threshold, more than the threshold, higher than thethreshold, greater than or equal to the threshold, less than thethreshold, fewer than the threshold, lower than the threshold, less thanor equal to the threshold, equal to the threshold, etc.

It will be apparent that systems and/or methods, described herein, maybe implemented in different forms of hardware, firmware, or acombination of hardware and software. The actual specialized controlhardware or software code used to implement these systems and/or methodsis not limiting of the implementations. Thus, the operation and behaviorof the systems and/or methods were described herein without reference tospecific software code—it being understood that software and hardwarecan be designed to implement the systems and/or methods based on thedescription herein.

Even though particular combinations of features are recited in theclaims and/or disclosed in the specification, these combinations are notintended to limit the disclosure of possible implementations. In fact,many of these features may be combined in ways not specifically recitedin the claims and/or disclosed in the specification. Although eachdependent claim listed below may directly depend on only one claim, thedisclosure of possible implementations includes each dependent claim incombination with every other claim in the claim set.

No element, act, or instruction used herein should be construed ascritical or essential unless explicitly described as such. Also, as usedherein, the articles “a” and “an” are intended to include one or moreitems, and may be used interchangeably with “one or more.” Furthermore,as used herein, the term “set” is intended to include one or more items(e.g., related items, unrelated items, a combination of related andunrelated items, etc.), and may be used interchangeably with “one ormore.” Where only one item is intended, the term “one” or similarlanguage is used. Also, as used herein, the terms “has,” “have,”“having,” or the like are intended to be open-ended terms. Further, thephrase “based on” is intended to mean “based, at least in part, on”unless explicitly stated otherwise.

What is claimed is:
 1. A device, comprising: a memory; and one or moreprocessors to: receive information identifying one or more tasks to beexecuted by a microservices application, the microservices applicationbeing associated with a microservice; determine whether an executiontime satisfies a threshold time, the execution time associated withexecution of the microservices application; and execute one or moreinstances of the microservice based on determining whether the executiontime satisfies the threshold time.
 2. The device of claim 1, wherein themicroservice is a first microservice, wherein the microservicesapplication is associated with the first microservice and a secondmicroservice, and wherein the one or more processors are further to:execute one or more instances of the second microservice based ondetermining whether the execution time satisfies the threshold time. 3.The device of claim 1, wherein the one or more processors are furtherto: increase a number of the one or more instances of the microservice;and update the execution time based on the increased number.
 4. Thedevice of claim 1, wherein the one or more processors, when executingthe one or more instances of the microservice, are to: selectivelyadjust the one or more instances of the microservice to enable aquantity of one or more of a plurality of first tasks associated withthe microservice to be executed in an expected time.
 5. The device ofclaim 1, wherein the one or more processors are further to: determine aquantity of the one or more of instances for the microservice based onone or more of: a model, or one or more resources associated with themicroservice.
 6. The device of claim 1, wherein the one or moreprocessors, to determine whether the execution time satisfies thethreshold time, are to: determine that the execution time satisfies thethreshold time; and wherein the one or more processors are further to:provision a network device to execute the microservices application. 7.The device of claim 1, wherein the execution time is associated withcompletion of the one or more tasks associated with the microservicesapplication.
 8. A non-transitory computer-readable medium storinginstructions, the instructions comprising: one or more instructionsthat, when executed by one or more processors, cause the one or moreprocessors to: receive information identifying one or more tasks to beexecuted by a microservices application, the microservices applicationbeing associated with a first microservice or a second microservice;determine whether an execution time satisfies a threshold time, theexecution time associated with execution of the microservicesapplication; and execute one or more instances of the first microserviceor one or more instances of the second microservice based on determiningwhether the execution time satisfies the threshold time.
 9. Thenon-transitory computer-readable medium of claim 8, where the one ormore instructions, when executed by the one or more processors, furthercause the one or more processors to: increase a number of the one ormore instances of the first microservice or the one or more instances ofthe second microservice; and update the execution time based on theincreased number.
 10. The non-transitory computer-readable medium ofclaim 8, wherein the execution time is associated with completion of theone or more tasks associated with the microservices application.
 11. Thenon-transitory computer-readable medium of claim 8, where the one ormore instructions, when executed by the one or more processors, furthercause the one or more processors to: determine the threshold time, thethreshold time being a time based on a service level agreement.
 12. Thenon-transitory computer-readable medium of claim 8, where the one ormore instructions, when executed by the one or more processors, furthercause the one or more processors to: decrease a number of the one ormore instances of the first microservice or the one or more instances ofthe second microservice; and update the execution time based on thedecreased number.
 13. The non-transitory computer-readable medium ofclaim 8, where the one or more instructions, when executed by the one ormore processors, further cause the one or more processors to:selectively adjust the one or more instances of the first microserviceto enable a quantity of one or more first tasks associated with themicroservice to be executed in an expected time.
 14. The non-transitorycomputer-readable medium of claim 8, where the one or more instructions,when executed by the one or more processors, further cause the one ormore processors to: selectively adjust the one or more instances of thesecond microservice to enable a quantity of one or more of first tasksassociated with the second microservice to be executed in an expectedtime.
 15. A method, comprising: receiving information identifying one ormore tasks to be executed by a microservices application, themicroservices application being associated with a microservice;determining whether an execution time satisfies a threshold time, theexecution time associated with execution of a task associated with themicroservice; and executing one or more instances of the microservicebased on determining whether the execution time satisfies the thresholdtime.
 16. The method of claim 15, further comprising: determining thethreshold time, the threshold time being a time based on a service levelagreement.
 17. The method of claim 15, wherein executing the one or moreinstances of the microservice comprises: selectively adjusting the oneor more instances of the microservice to enable a quantity of tasksassociated with the microservice to be executed in an expected time, thequantity of tasks including the task.
 18. The method of claim 15,wherein a microservice is a first microservice, wherein themicroservices application is associated with the first microservice anda second microservice, and further comprising: executing one or moreinstances of the second microservice based on determining whether theexecution time satisfies the threshold time.
 19. The method of claim 15,further comprising: determining a quantity of the one or more ofinstances for the microservice based on one or more of: a model, one ormore resources associated with the microservice, or a score of themicroservice.
 20. The method of claim 15, wherein determining whetherthe execution time satisfies the threshold time comprises: determiningthat the execution time satisfies the threshold time; and furthercomprising: provisioning a network device to execute the microservicesapplication.